FROM node:13.3.0
RUN mkdir -p /app

# Set the working directory to /app
WORKDIR /app

# Copy the scr directory contents into the container at /app
COPY . /app/

# 安装依赖
RUN npm config set registry https://registry.npm.taobao.org
RUN npm install --production

# Make port 3000 available to the world outside this container
EXPOSE 3000

# Define environment variable
ENV NODE_ENV production

# start server
CMD ["npm", "run", "start"]


# docker build -t eggjs-example .
# docker run --link dockermysql:mysql -p 3000:3000 eggjs-example